#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui>
#include "resmodel.h"
#include "updateresthread.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void showUpdateResView(const ResModel &res);
    void setRes(ResModel &res);
protected:
    void mousePressEvent(QMouseEvent *me);
    void mouseMoveEvent(QMouseEvent *me);


private slots:
    void on_w_close_clicked();

    void on_w_min_clicked();

    void updateResView(const ResModel &res);


    void on_btn_down_clicked();

    void on_btn_pause_clicked();

private:
    Ui::MainWindow *ui;
    QPoint dragPosition;
    bool m_bMoveable;
    UpdateResThread *updateThread;
    ResModel res;
};

#endif // MAINWINDOW_H
